CX_DATETIME
Class hierarchy
Description:
A point in time represents the combination of a date and a time, whereby the possible types from both classes can be mixed as desired. In the simplest case, a current date is combined with a point in time. When generating the time point, it is "empty", i.e. it does not contain any information about a time or a date.
Examples:
- "On 7 March 1996 at 15.20"
- "On 7 March 1996 from 15.20 to 17.00"
- "From 7 to 9 March 1996, every day from 15.20 to 17.00"
- "Every penultimate Monday of the month from 8.00 to 10.00"
Code example:
In diesem Beispiel-Programm wird überprüft, ob das Datum "11.11.1996" in dem Datum des Zeitpunktes "8.3.1996" enthalten ist.
Var(date1, date2, term) // generiere das Datum und den Zeitpunkt
CreateTransObject(CX_DATE) -> date1 "8.3.1996" date1 Put
CreateTransObject(CX_DATE) -> date2 "11.11.1996" date2 Put
CreateTransObject(CX_DATETIME) -> term date1 term SetReference(date)
date2 term Call(Comprise) // überprüfe die Daten
Da das Datum nicht in dem Datum des Zeitpunktes enthalten ist, wird ein leeres Objekt zurückgeliefert.
Operators
Operator | Brief description |
---|---|
>, <, = | Compare |
Function | MA* | Parameters | Return | Brief description |
---|---|---|---|---|
Comprise | (OBJECT) | OBJECT | Check whether a specific date is included in the time | |
EndOfTerm | OBJECT | End of the date | ||
NextTerm | (OBJECT) | OBJECT | the date within the date | |
Normalize | Normalising the time | |||
StartOfTerm | OBJECT | Start of the time | ||
string | INTEGER | CX_STRING | Returns the string representation of the object |
* MA = Member Access Function
Data field | Type | Reference class | I* | Brief description |
---|---|---|---|---|
cycles | INTEGER | |||
time | POINTER | CX_TIME | Any time or NULL | |
date | POINTER | CX_DATE | Any date or NULL |
* I = Indexable data field
Module | Brief description |
---|---|